<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
    <style type="text/css">
        img{
        width: 100%;
        height: 50px;
        }
    </style>
</head>
<body>
<input type="file">选择文件

<img id="img">


<script>

</script>
</body>
</html>